﻿<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>主界面</title>
    <link rel="stylesheet" type="text/css" th:href="@{/bootstrap/css/bootstrap.min.css}"/>
    <script type="text/javascript" th:src="@{/jquery.min.js}"></script>
</head>
<body>
<div class="container-fluid" style="margin-top: 30px;">
    <div class="row" style="text-align: center">
        <div class="col-md-4">
            <button class="btn btn-success btn-lg" onclick="switchFlag(1);">
                文件系统
            </button>
        </div>
        <div class="col-md-4">
            <button class="btn btn-danger btn-lg" onclick="switchFlag(2);">
                数据库系统
            </button>
        </div>
        <div class="col-md-4">
            <button class="btn btn-primary btn-lg" onclick="switchFlag(3);">
                执行脚本
            </button>
        </div>
    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    var ctx = [[@{/}]];ctx = ctx.substr(0, ctx.length - 1);<!--获取项目根路径-->
    function switchFlag(flag){
        var url = ctx;
        if (flag==1){
            url += "/tree/";
        }else if (flag==2){
            url += "/db/";
        }else if (flag==3){
            url += "/system/";
        }
        window.location = url;
    }
</script>
</body>
</html>